package cn.eeany.zutools.mapdb

import cn.hutool.bloomfilter.BitMapBloomFilter
import org.mapdb.DB
import org.mapdb.DBMaker

import java.util.concurrent.ConcurrentMap

DB db = DBMaker.fileDB("file.db").make();
ConcurrentMap map = db.hashMap("map").createOrOpen();
String key = "something";
String val = "here";
map.put(key, val);
System.out.println("第1次取值，" +map.get(key));
db.close();
System.out.println("----------重新打开----------");
db = DBMaker.fileDB("file.db").make();
map = db.hashMap("map").createOrOpen();
System.out.println("第2次取值，" +map.get(key));

//BitMapBloomFilter filter = new BitMapBloomFilter(100);
//filter.add("zuaa")
//map.put("zuaa",filter);
BitMapBloomFilter filter =map.get("zuaa")
println  filter.contains("zuaa")
db.close();